/*
 * Licensed Materials - Property of tenxcloud.com
 * (C) Copyright 2018 TenxCloud. All Rights Reserved.
 * 2018-06-13  @author lizhen
 */

package contract

type LoginInfo interface {
	GetUserID() int
	GetUserName() string
	GetUserToken() string
}

type JWT interface {
	Authorize(loginInfo LoginInfo) (token string, err error)
	Validate(token string) (loginInfo LoginInfo, err error)
	IsBearerToken(rawToken string) (ok bool, token string)
	IsTokenExpired(err error) bool
}
